package com.zhou.org.mapper;

import com.zhou.org.dao.Right;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhou.org.dto.RightPageDto;
import com.zhou.org.dto.RightQueryDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lang.zhou
 * @since 2022-08-23
 */
@Repository
public interface RightMapper extends BaseMapper<Right> {
    List<String> getDistinctRightKey();
    List<RightPageDto> getRight(@Param("dto") RightQueryDto dto);
    void deleteRightByOrgId(@Param("orgId")int orgId);
    void deleteRightByObjectId(@Param("rightKey")String rightKey, @Param("objectId") String objectId);
    void deleteRight(@Param("rightKey")String rightKey,@Param("rightType") String rightType,@Param("orgId") int orgId);
}
